package live.jialing.sip.message.box.service;

import live.jialing.core.data.LinkType;
import live.jialing.core.data.jpa.CustomJpaRepository;
import live.jialing.core.service.BaseDomainService;
import live.jialing.core.service.GeneralService;
import live.jialing.data.util.SpecificationUtil;
import live.jialing.sip.message.box.domain.OutBoxEmployee;
import live.jialing.sip.message.box.repository.InfomationRepository;
import live.jialing.sip.message.box.repository.OutBoxEmployeeRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Map;

/**
 * 公司内部发件箱
 */
@Service
@Slf4j
public class OutBoxEmployeeService extends BaseDomainService<OutBoxEmployee, Long> implements GeneralService<OutBoxEmployee, Long> {
    
    @Resource
    private OutBoxEmployeeRepository outBoxEmployeeRepository;

    @Resource
    private InfomationRepository infomationRepository;

    @Override
    public CustomJpaRepository getRepository() {
        return this.outBoxEmployeeRepository;
    }

    public Specification<OutBoxEmployee> buildSpecification(Class<OutBoxEmployee> classz, Map<String, Object> searchParams, LinkType type) {

        return SpecificationUtil.buildSpecification(classz, searchParams, type);
    }
}
